package com.icss.day01;

public class Test8 {
    public static void main(String[] args) {

        Student stu = new Student();
        stu.setAge(10);

        // 值类型传递
        abc(stu.getAge());
        System.out.println(stu.getAge());


        // 引用类型传递
        abc1(stu);
        System.out.println(stu.getAge());
    }

    private static void abc1(Student stu) {

        stu = new Student();
        stu.setAge(100);
    }

    private static void abc(int age) {
        age = 100;
    }
}
